﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PrintDll
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        UserControl printUC = new ChiFengTag("智", "智", "智", "智", "智", "智", "1#智", "智.5%", "智");
        public MainWindow()
        {
            InitializeComponent();
        }

        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            //new PrintPreviewWindow(new PrintModel()).ShowDialog();

            //var userControl = new ChiFengTag("豫A11111", "赤峰云铜有色金属有限公司", "赤峰云铜有色金属有限公司", "11吨", "10吨", "1吨", "1#23412315123", "硫酸92.5%", "孙悟空");
            //var userControl = new ChiFengTag("国", "国", "国", "国", "国", "国", "1#国", "国.5%", "国");

            //printUC = new ChiFengTag("智", "智", "智", "智", "智", "智", "1#智", "智.5%", "智");
            //border.Child = printUC;
            //OPrintHelper.Print(printUC, "123");

            //Thread.Sleep(10000);

            List<string> InfoList = new List<string>();

            InfoList.Add("出门证");
            InfoList.Add("蒙D12345");
            InfoList.Add("杨智可");
            InfoList.Add("410325190001020511");
            InfoList.Add(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

            Printer printer1 = new Printer
            {
                LoginID = 12,
                InfoList = InfoList
            };
            printer1.Print();

            //MessageBox.Show("打印完成");
            LogHelper.WriteLog("打印出门证：完成！");
        }
    }
}
